package com.example.epic.bean.mq;

import com.example.epic.bean.InAndOutRecord;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MqSender {

    @Autowired
    RabbitTemplate rabbitTemplate;

    public void sendInOutRecord(InAndOutRecord inAndOutRecord){
        rabbitTemplate.convertAndSend("inOutRecordDirectExchange", "inOutRecor", inAndOutRecord);
    }
}
